<include file="public@header"/>
<style>html {background-color: #ffffff;}</style>

</head>
<body>

<div class="layui-fluid">
    <form method="post" class="layui-form js-ajax-form" action="{:url('users/editPost')}" style="margin-top: 20px;">
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="form-required">*</span>用户名</label>
            <div class="layui-input-block" style="padding-top:7px;">
                {$data['user_login']}
            </div>
        </div>
    
        <div class="layui-form-item">
            <label for="input-user_pass" class="layui-form-label"><span class="form-required">*</span>密码</label>
            <div class="layui-input-block">
                <input type="password" required lay-verify="required" class="layui-input" id="input-user_pass"
                       name="user_pass" value=""> 不修改留空 6-12位字母数字组合
            </div>
        </div>
    
        <div class="layui-form-item">
            <label for="input-user_nickname" class="layui-form-label"><span class="form-required">*</span>昵称</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" required lay-verify="required" id="input-user_nickname"
                       name="user_nickname" value="{$data['user_nickname']}">
            </div>
        </div>
    
        <!-- <div class="layui-form-item">
            <label class="layui-form-label"><span class="form-required">*</span>头像</label>
            <div class="layui-input-block">
                <input type="hidden" name="avatar" id="thumbnail" value="{$data['avatar']}">
                <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
                    <if condition="empty($data.avatar)">
                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                             id="thumbnail-preview"
                             style="cursor: pointer;max-width:100px;max-height:100px;"/>
                        <else/>
                        <img src="{:cmf_get_image_preview_url($data.avatar)}"
                             id="thumbnail-preview"
                             style="cursor: pointer;max-width:100px;max-height:100px;"/>
                    </if>
                </a>
                <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片"> 建议尺寸： 600 X 600
            </div>
        </div> -->

        <div class="layui-form-item">
			<label for="input-user_login" class="layui-form-label">头像</label>

			<div class="layui-input-block">
				<input type="hidden" name="avatar" id="thumbnail1" value="">
				<a href="javascript:uploadOneImage('图片上传','#thumbnail1');">
                    <if condition="empty($data.avatar)">
                        <img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumbnail1-preview" style="cursor: pointer;max-width:150px;max-height:150px;"/>
                    <else/>
                        <img src="{:cmf_get_image_preview_url($data.avatar)}" id="thumbnail1-preview" style="cursor: pointer;max-width:150px;max-height:150px;"/>
                    </if>
				</a>
				<div class="layui-col-md12" style="margin-top: 10px">
					<input type="button" class="layui-btn layui-btn-sm layui-btn-normal"
						   onclick="$('#thumbnail1-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail1').val('');return false;"
						   value="取消图片">
				</div>
			</div>
		</div>

    
        <!-- <div class="layui-form-item" id="">
            <label class="layui-form-label"><span class="form-required">*</span>头像小图</label>
            <div class="layui-input-block">
                <input type="hidden" name="avatar_thumb" id="thumbnail2" value="{$data['avatar_thumb']}">
                <a href="javascript:uploadOneImage('图片上传','#thumbnail2');">
                    <if condition="empty($data.avatar_thumb)">
                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                             id="thumbnail2-preview"
                             style="cursor: pointer;max-width:100px;max-height:100px;"/>
                        <else/>
                        <img src="{:cmf_get_image_preview_url($data.avatar_thumb)}"
                             id="thumbnail2-preview"
                             style="cursor: pointer;max-width:100px;max-height:100px;"/>
                    </if>
                </a>
                <input type="button" class="btn btn-sm btn-cancel-thumbnail2" value="取消图片"> 分享用 建议尺寸： 100 X 100 必须小于 200 X
                200
            </div>
        </div> -->

        <div class="layui-form-item">
			<label class="layui-form-label">头像小图</label>

			<div class="layui-input-block">
				<input type="hidden" name="avatar_thumb" id="thumbnail2" value="">
				<a href="javascript:uploadOneImage('图片上传','#thumbnail2');">
                    
                    <if condition="empty($data.avatar_thumb)">
                        <img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumbnail2-preview" style="cursor: pointer;max-width:150px;max-height:150px;"/>
                    <else/>
                        <img src="{:cmf_get_image_preview_url($data.avatar_thumb)}" id="thumbnail2-preview" style="cursor: pointer;max-width:150px;max-height:150px;"/>
                    </if>

				</a>
				<div class="layui-col-md12" style="margin-top: 10px">
					<input type="button" class="layui-btn layui-btn-sm layui-btn-normal"
						   onclick="$('#thumbnail2-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail2').val('');return false;"
						   value="取消图片">
				</div>
			</div>
		</div>
    
        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <select class="layui-input" name="sex">
                    <option value="1">男</option>
                    <option value="2"
                    <eq name="data['sex']" value="2">selected</eq>
                    >女</option>
                </select>
            </div>
        </div>
    
        <div class="layui-form-item">
            <label for="input-mobile" class="layui-form-label"><span class="form-required">*</span>手机号</label>
            <div class="layui-input-block">
                <input type="text" required lay-verify="required" class="layui-input" id="input-mobile" name="mobile"
                       value="{$data['mobile']}">
            </div>
        </div>
    
        <if condition="$data['type'] eq 1">
            <div class="layui-form-item layui-text">
                <label for="input-school" class="layui-form-label">学校</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea" id="input-school" name="school">{$data['school']}</textarea>
                </div>
            </div>
    
            <div class="layui-form-item layui-text">
                <label for="input-experience" class="layui-form-label">教育经历</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea" id="input-experience"
                              name="experience">{$data['experience']}</textarea>
                </div>
            </div>
    
            <div class="layui-form-item layui-text">
                <label for="input-feature" class="layui-form-label">教育特点</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea" id="input-feature" name="feature">{$data['feature']}</textarea>
                </div>
            </div>
        </if>
    
        <div class="layui-form-item">
            <div class="layui-input-block">
					<input type="hidden" name="id" value="{$data.id}" />

                <button type="submit" id="js-ajax-submit" class="layui-btn js-ajax-submit js-close">{:lang('ADD')}</button>
            </div>
        </div>
    
    </form>
</div>

<script type="text/javascript" src="__STATIC__/js/wind.js"></script>

<script src="__STATIC__/js/admin.js"></script>

</body>
</html>